Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system] Fix maxWidth incorrectly resolving breakpoints with non-pixel units #38633

Merged
merged 4 commits into from
Sep 1, 2023

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Aug 24, 2023

@mj12albert mj12albert added bug 🐛 Something doesn't work package: system Specific to @mui/system labels Aug 24, 2023
@mui-bot
Copy link

mui-bot commented Aug 24, 2023

Netlify deploy preview

https://deploy-preview-38633--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against efd64ba

@mj12albert mj12albert marked this pull request as ready for review August 24, 2023 18:06
@mj12albert mj12albert requested review from siriwatknp, mnajdova and brijeshb42 and removed request for mnajdova August 24, 2023 18:07
};
}

if (props.theme?.breakpoints?.unit !== 'px') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Do we need to check if it's not px? Why not just append the unit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brijeshb42 I just didn't want to change the existing behavior for pixels - i.e. returning maxWidth: 100 instead of maxWidth: '100px' 😬

@mj12albert mj12albert merged commit 347d5df into mui:master Sep 1, 2023
5 checks passed
@mj12albert mj12albert deleted the fix/system-max-width branch September 1, 2023 10:12
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Sep 8, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Sep 8, 2023
anon-phantom pushed a commit to anon-phantom/material-ui that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[system] maxWidth prop does not respect rem breakpoints
3 participants